Skip to content

fix: remove deprecated Gemini preview image models#719

Open
285729101 wants to merge 1 commit intoMerit-Systems:masterfrom
285729101:fix/remove-deprecated-gemini-models
Open

fix: remove deprecated Gemini preview image models#719
285729101 wants to merge 1 commit intoMerit-Systems:masterfrom
285729101:fix/remove-deprecated-gemini-models

Conversation

@285729101
Copy link

Summary

  • Removes gemini-2.0-flash-preview-image-generation and gemini-2.5-flash-image-preview from the SDK, tests, and templates
  • Updates the next-image template to use the GA model gemini-2.5-flash-image instead of the deprecated preview variant

Changes

File Change
packages/sdk/ts/src/supported-models/chat/gemini.ts Remove both deprecated models from GeminiModel type union and GeminiModels registry
packages/tests/provider-smoke/gemini-generate-text.test.ts Remove deprecated model from smoke test blacklist (model no longer exists in registry)
templates/next-image/src/app/api/generate-image/google.ts Replace gemini-2.5-flash-image-previewgemini-2.5-flash-image
templates/next-image/src/app/api/edit-image/google.ts Replace gemini-2.5-flash-image-previewgemini-2.5-flash-image

Context

Per Google's deprecation notice, both preview image generation models are being retired. The GA replacement gemini-2.5-flash-image is already in the SDK model registry and provides the same image generation capabilities.

Fixes #634

🤖 Generated with Claude Code

Remove `gemini-2.0-flash-preview-image-generation` and
`gemini-2.5-flash-image-preview` which are being retired by Google.

Changes:
- SDK: Remove both models from GeminiModel type union and GeminiModels
  registry
- Tests: Remove deprecated model from smoke test blacklist
- Templates: Update next-image template to use the GA model
  `gemini-2.5-flash-image` instead of the deprecated preview variant

Ref: https://docs.cloud.google.com/vertex-ai/generative-ai/docs/models/gemini/2-0-flash

Fixes Merit-Systems#634

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@vercel
Copy link
Contributor

vercel bot commented Feb 16, 2026

@285729101 is attempting to deploy a commit to the Merit Systems Team on Vercel.

A member of the Team first needs to authorize it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Handle Gemini Deprecation

1 participant

Comments